<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<div class="col-md-7 col-lg-offset-2 well">
    <c:if test="${not empty error}">
        <div class="alert alert-dismissable alert-danger">
            <p>${error}</p>
        </div>
    </c:if>
    <c:if test="${not empty message}">
        <div class="alert alert-dismissable alert-success">
            <p>${message}</p>
        </div>
    </c:if>
    <h3>Create new account</h3>
    <form:form modelAttribute="user" commandName="user" action="register" id="registerForm" method='POST'
               class="form-horizontal">
        <div class="form-group">
            <label for="userLogin" class="col-sm-4 control-label" id="userLogin">Login:</label>

            <div class="col-sm-8">
                <form:input path="userLogin" class="form-control" placeholder="Enter your login"/>
            </div>
        </div>
        <div class="form-group">
            <label for="userPassHash" class="col-sm-4 control-label">Password:</label>

            <div class="col-sm-8">
                <form:input path="userPassHash" type="password" class="form-control" placeholder="Enter your password"/>
            </div>
        </div>
        <div class="form-group">
            <label for="userPassHashRepeat" class="col-sm-4 control-label">Repeat password:</label>

            <div class="col-sm-8">
                <input type="password" id="userPassHashRepeat" name="userPassHashRepeat" class="form-control"
                       placeholder="Repeat your password"/>
            </div>
        </div>
        <div class="form-group">
            <label for="userEmail" class="col-sm-4 control-label">E-mail</label>

            <div class="col-sm-8">
                <form:input path="userEmail" type="text" class="form-control" placeholder="Enter your Email"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-4 col-sm-8">
                <button type="submit" class="btn btn-primary">Sign Up</button>
            </div>
        </div>
    </form:form>
</div>

<script>

</script>